﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CodeCamp.Models.EventMgmt
{
    public class EventMgmtUserViewModel
    {
        public EventMgmtUserViewModel()
        {
            //Roles4User = new List<string>();
            //RolesAvailable = new List<string>();
            //RolesCSV = string.Empty;
        }

        public string Username { get; set; }
        public string PresenterFirstName { get; set; }
        public string PresenterLastName { get; set; }
        public string PresenterName { get; set; }
        public string SiteUserEmailAddress { get; set; }
        public string UserEmailAddress { get; set; }
        public string PresenterEmailAddress { get; set; }
        public Nullable<DateTime> PresenterCreationDate { get; set; }
        public Nullable<DateTime> UserCreationDate { get; set; }
        public Nullable<DateTime> LastActivityDate { get; set; }
        public Nullable<DateTime> LastLoginDate { get; set; }
        public bool IsApproved { get; set; }
        public bool IsLockedOut { get; set; }
        public bool IsOnline { get; set; }
        public Nullable<int> PresenterId { get; set; }
        //public List<string> Roles4User { get; private set; }
        //public List<string> RolesAvailable { get; private set; }
        //public string RolesCSV { get; private set; }
        public string ProviderUserKey { get; set; }
        public Nullable<int> SiteUserId { get; set; }
        public int SessionCount { get; set; }
        public int PresenterEmailCount { get; set; }
        public int SiteUserEmailCount { get; set; }

        //public void SetRoles(string[] roles4User, string[] rolesAvailable)
        //{
        //    this.Roles4User.Clear();
        //    this.RolesAvailable.Clear();

        //    if (roles4User != null)
        //    {
        //        this.Roles4User = new List<string>(roles4User);
        //    }

        //    if (rolesAvailable != null)
        //    {
        //        this.RolesAvailable = new List<string>(rolesAvailable);
        //    }
        //    StringBuilder sbRoles = new StringBuilder();
        //    bool first = true;
        //    foreach (string role in Roles4User)
        //    {
        //        if (first)
        //            first = false;
        //        else
        //            sbRoles.Append(", ");
        //        sbRoles.Append(role);
        //    }
        //    RolesCSV = sbRoles.ToString();
        //}
    }
}